import type { LoginForm, RegisterForm } from "@/types/login";
import request from "./request";
import { Controller } from '@/api/request'
export const loginApi = (data: LoginForm) => request<any, ApiRes<string>>({
    url: `${Controller.user}/login`,
    method: "post",
    data
});

export const registerApi = (data: RegisterForm) => request<any, ApiRes<null>>({
    url: `${Controller.user}/register`,
    method: "post",
    data
});
export const logoutApi = () => request<any, ApiRes<null>>({
    url: `${Controller.user}/logout`,
});
